Assignment
read a microcontroller data sheet
program your board to do something, with as many different programming languages
and programming environments as possible
Nobody works from scratch - I find a program and I modify it.
load the program - get it working and then make small changes to it.
Area with pins in the DAtA sheets. Install arduino programming
I connected my board to the computer but ran into trouble since my computer couldn’t read my board.
We looked into my board and found some misstakes - the USB port was not well enough connected and
the D1 and D2 didn’t turn right. There is a small line at the end of them that is supposed to be on the right
side of the board but I had them on the left. I fixed these things and my computer was able to read my board.
We were just a bit surprised how I was able to program it in the week 4. I went back into my notes and I have
a screenshot of the window when I finished so...
I followed the instruction from this website:
Then I downloaded the Arduino software and I looked at these instructions even though I didn’t follow them
fully.
architectures
Harvard, von Neumann Aiken computer bug - memory and code where separate - Neumann
RISC simple CISC complex
microprocessor, microcontroller we are using Harvard controller
FPGA, CPLD
ALA
memory
registers
SRAM larger memory
DRAM much larger but slower
EEPROM permanent values
FLASH
fuse
we need to talk to all of these memories
peripherals
A/D analog to digital
comparator
D/A digital to analog
timer/counter/PWM
USART
USB
...
word size
8 bit processor, on one side go down to 1 bit, on the other to 64 bit
16
32
64
families
8051 stay away
PIC
MSP
AVR we are focusing on this one, high performance - high level program - big toolchain
ARM bigger
STM32 specialized, each have their own toolchains
PSoC, xCORE, Propeller
vendors
Octopart search engine for parts
Digi-Key
Mouser
Newark
Farnell
SparkFun
AVR processors low cost, powerful, large tools chains
ATtiny10
ATtiny45V
ATtiny44A most common that we will use.
ATmega328P add more pins, it adds hardware supports, more performance
ATmega16U2
ATxmega16E5
ATxmega16C4
All these we can use, they differ on pins and level of performance.
tutorials browse around
data sheets read them. info on so much
packages
DIP through hole
SOT
SOIC
TSSOP
TQFP
LQFP
MLF, CSP, BGA
clocks how accurately does it need to tell time
RC (10%, 1% calibrated)
ceramic (0.5%)
quartz (50 ppm)
in-system development
ISP (header, pads, clip)
bootloader program that loads programs
JTAG, dfebugWire, PDI load and control the processor
ICE virtual processor
programmers
ISP
AVRISP
FabISP
avrdude
JTAG, debugWIRE, PDI
Atmel-ICE
assembly language
hex file
instruction set, opcodes
mnemonics, directives, expressions
avr-as usng words - we will use C language
gavrasm
C
GCC freely available c roll platform compiler
AVR Libc
modules types math
avr-libc, binutils-avr, gcc-avr
WinAVR
CrossPack
Atmel Studio for windows users
host communication
RS232
bit timing
VT100/ANSI/ISO/ECMA terminal
Kermit
Minicom
term.py
USB
software
hardware
FTDI
cable
libFTDI
echo hello-world
hello.ftdi.44.cad board components traces interior
programming
hello.ftdi.44.echo.c hello.ftdi.44.echo.c.make
hello.ftdi.44.echo.interrupt.c hello.ftdi.44.echo.interrupt.c.make
hello.ftdi.44.echo.asm hello.ftdi.44.echo.asm.make
IDE
Atmel Studio
Eclipse AVR
Firefly
Scratch
Modkit
boards
Arduino
board + C libraries + IDE + bootloader
Fabkit Fabio
hello.arduino.328P.cad board components traces interior
Blink.pde boards.txt programming
hello.arduino.328P.blink.c hello.arduino.328P.blink.make programming
ATtiny
PSoC
Maple
Tessel
BeagleBone
PandaBoard
Rasberry Pi
Interpreters higher level languages but slower - we start with C
Python
BASIC
FORTH
AVRSH
JavaScript
debugging
"printf"
Atmel Studio
gdb, ddd, Insight
STM32
processor
STM32F3 data sheet
toolchain
gcc-arm-none-eabi
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
OpenOCD
http://sourceforge.net/projects/openocd/files/latest/download?source=files
QStlink2
sudo add-apt-repository ppa:mobyfab/qstlink2
stlink
git clone https://github.com/texane/stlink.git
programmer
ST-Link V2
software
ST library STMCube
board
STM32F3Discovery software
blink.zip programming
Nucleo